<%@ page import="gdepot.TransactionRecord" %>
<%@ page import="gdepot.AccountBank" %>
<%@ page import="gdepot.Orders" %>
<%@ page import="gdepot.Bank" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main">
    <g:set var="entityName" value="${message(code: 'transactionRecord.label', default: 'TransactionRecord')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
</head>

<body>
%{--<section id="contact"style="background-image: url('../img/map-image.png')" >--}%
<section id="portfolio" class="bg-light-gray" >
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-center">
                <h2 class="section-heading">Bind bank card</h2>

                <h3 class="section-subheading text-muted">Please fill in the complete personal information</h3>
            </div>
        </div>
        <g:if test="${flash.message}">
            <div class="alert alert-warning">
                <a href="#" class="close" data-dismiss="alert">
                &times;
                </a>
                <strong>${flash.message}</strong>
            </div>
        </g:if>
        <div class="row">
            <div class="container col-lg-8">
                <div class="container col-md-6 col-md-offset-3" style="width: 800px;">
                    <div class="panel panel-primary">
                        <div class="panel-heading" style="background-color: #222">开通银行账户</div>

                        <div class="panel-body">
                            <g:form action="sendFiveElementsQuickPay" method="post" class="form-horizontal">

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">账户名称<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="name" maxlength="20" required=""
                                                     value="${accountBankInstance?.fullName}" class="form-control"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">预留手机号<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="cellphone" required=""
                                                     value="${accountBankInstance?.cellphone}" class="form-control"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">证件类型<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:select name="certificateType"
                                                  from="['身份证', '护照', '军官证', '士兵证', '回乡证', '户口本', '外国护照', '其他']"
                                                  value="${accountBankInstance?.certificateType}" required=""
                                                  noSelection="['': '']" class="form-control"/>

                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">证件号码<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="idCard" maxlength="20" required=""
                                                     value="${accountBankInstance?.idCard}" class="form-control"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">所选银行<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="bankName" maxlength="20" required="" value="${bank?.name}"
                                                     class="form-control"/>
                                        <g:hiddenField name="bankCode" value="${bank?.code}"/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">银行卡号<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="bankCardNo" maxlength="20" required=""
                                                     value="${accountBankInstance?.bankCardNo}" class="form-control"/>
                                    </div>
                                </div>

                                <g:hiddenField name="email" value="${session.user.email}"/>
                                <g:submitButton name="sendVerifyCode" class="btn btn-info btn-block " value="发送验证码"/>
                            </g:form>
                            <br/>
                            <g:form action="verifyInformation" method="post" class="form-horizontal">
                                <g:hiddenField name="cellphone" value="${accountBankInstance?.cellphone}"/>
                                <g:hiddenField name="bankCardNo" value="${accountBankInstance?.bankCardNo}"/>
                                <g:hiddenField name="bankCode" value="${bank?.code}"/>

                                <div class="form-group">
                                    <label for="password" class="col-lg-2 control-label">验证码<span
                                            class="required-indicator">*</span></label>

                                    <div class="col-lg-10">
                                        <g:textField name="verifyCode" maxlength="6" class="form-control"/>
                                    </div>
                                </div>

                                <g:submitButton name="nextStep" class="btn btn-success btn-block" required=""
                                                value="下一步"/>
                            </g:form>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</section>

</body>
</html>
